precedence
Type
glossary
Description
The set of rules that determine what order operators are evaluated in, in an expression that has more than one operator. Simplified, the rules for numeric operators are as follows:
- Operations grouped by parentheses.
- Exponentiation.
- Multiplication and division, from left to right.
- Addition and subtraction, from left to right.
For example, the * operator has higher precedence than the + operator, so 2 + 3 * 4 is evaluated as 2 + (3 * 4), not (2 + 3) * 4.
Related
glossary: evaluate, operator, expression